export const fullscreen = {
  mounted(el, binding) {
    el.addEventListener('dblclick', () => {
      if (!document.fullscreenElement) {
        el.requestFullscreen().catch(err => {
          console.error(`全屏错误: ${err.message}`);
        });
      } else {
        document.exitFullscreen();
      }
    });
  }
};
